package com.hjc.springbootmovies.mapper;

import com.hjc.springbootmovies.entity.ModelUsers;
import org.apache.ibatis.annotations.*;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/4
 * Time: 13:53
 * To change this template use File | Settings | File Templates.
 */
@Mapper
public interface MappingUsers {

    @Select("select uid,uname,urealname from userinfo where uname = #{uid} and upsw = #{psw} ")
    @Results({
            @Result( property = "uid", column = "uid"),
            @Result( property = "uname" ,column = "uname"),
            @Result( property = "urealname" , column = "urealname")
    })
    ModelUsers queryById(@Param("uid")String uid,@Param("psw")String psw);
}
